package main;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import repository.TermRepository;

import model.TermModel;

import entity.Node;
import entity.Term;

public class Main {

	static List<Node> nodes = new ArrayList<>();

	public static void main(String[] args) {

		String query = "SELECT ?country_name  ?population WHERE {?country_name rdfs:label ?country_test . ?country prop:populationEstimate ?population_name . ?country_test prop:populationEstimate_test ?country .}";

		TermModel graphModel = new TermModel();
		List<Term> term = graphModel.extractTermWithQuery(query);

		try {

			new TermRepository().saveTerm(term);

		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
